<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Extended Item Presentation-Time Support</title>
<style>@import url("file:/C:/eclipse/Eclipse 3.2/plugins/org.eclipse.sdk_3.2.0.v20060214/book.css");</style>
<style>@import url("file:/C:/eclipse/Eclipse 3.2/configuration/org.eclipse.osgi/bundles/120/1/.cp/schema.css");</style>
</HEAD>
<BODY>
<H1><CENTER>Extended Item Presentation-Time Support</CENTER></H1>
<p></p>
<h6 class=CaptionFigColumn id=header>Identifier: </h6>org.eclipse.birt.report.engine.reportitempresentation<p></p>
<h6 class=CaptionFigColumn id=header>Since: </h6>1.0
<p></p>

<p>
<h6 class=CaptionFigColumn id=header>Description: </h6>This extension point specifies how the new report item should be instantiated,  processed, and rendered at presentation (rendering) time. In a server environment, the plugin registry uses this extension point registration to discover supported report item extensions.</p>
<p><h6 class=CaptionFigColumn id=header>Configuration Markup:</h6></p>
<p class=code id=dtd>&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.reportItem">reportItem</a>+)&gt;</p>
<p class=code id=dtd>&lt;!ATTLIST extension</p>
<p class=code id=dtdAttlist>point&nbsp;CDATA #REQUIRED<p class=code id=dtdAttlist>id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED<p class=code id=dtdAttlist>name&nbsp;&nbsp;CDATA #IMPLIED&gt;</p>
<p></p>
<ul class=ConfigMarkup id=attlistDesc>
<li><b>point</b> - a fully qualified identifier of the target extension point</li>
<li><b>id</b> - an optional identifier of the extension instance</li>
<li><b>name</b> - an optional name of the extension instance</li>
</ul>
<br><p class=code id=dtd>&lt;!ELEMENT <a name="e.reportItem">reportItem</a> EMPTY&gt;</p>
<p class=code id=dtd>&lt;!ATTLIST reportItem</p>
<p class=code id=dtdAttlist>name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED<p class=code id=dtdAttlist>class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED<p class=code id=dtdAttlist>supportedFormats&nbsp;CDATA #IMPLIED&gt;</p>
<p></p>
<ul class=ConfigMarkup id=attlistDesc>
<li><b>name</b> - the unique name of the extended item, i.e., "org.eclipse.birt.chart" for BIRT supplied chart extension.</li>
<li><b>class</b> - the java class that implements the <code>IReportItemPresentation</code></li>
<li><b>supportedFormats</b> - The supported rendering formats for this extended item. The value for this attribute is a comma-separated string, i.e., "HTML,PDF,EXCEL', etc. The string is case-insensitive.</li>
</ul>
<br><h6 class=CaptionFigColumn id=header>Examples: </h6>The following is a sample usage of the reportItemPresentation extension point:

<p>
<pre>
<p class=code id=tag>&lt;extension point=<p class=code id=cstring>&quot;org.eclipse.birt.report.engine.reportitempresentation&quot;</p><p class=code id=tag> 
name=<p class=code id=cstring>&quot;chart presentation extension&quot;</p><p class=code id=tag>&gt;</p>
  <p class=code id=tag>&lt;reportItem name=<p class=code id=cstring>&quot;org.eclipse.birt.chart&quot;</p><p class=code id=tag> class=<p class=code id=cstring>&quot;org.eclipse.birt.report.chartitem.ChartPresentation&quot;</p><p class=code id=tag> 
  supportedFormats=<p class=code id=cstring>&quot;FO,HTML,PDF&quot;</p><p class=code id=tag>/&gt;</p>
 <p class=code id=tag>&lt;/extension&gt;</p>
 </pre>
 <p>
<p></p>

<h6 class=CaptionFigColumn id=header>API Information: </h6>The value of the class attribute must be the fully qualified name of a class that implements <code>org.eclipse.birt.engine.extension.IReportItemPresentation</code>. The interface provides the following functions:

<ul>
<li><code>public void setModelObject(ExtendedItemHandle handle)</code> ---- 
 passes the model object to the extension provider. </li>
<li><code>public void setResolution(int dpi)</code> ---- 
passes the rendering environment resolution (dpi, i.e., dot per inch) to extension provider.</li>
<li><code>public void setOutputFormat(String outputFormat)</code> ---- 
passes the output format, i.e., HTMl, PDF, etc. to extension provider.</li>
<li><code>public void setSupportedImageFormats(String supportedImageFormats)</code> ---- 
passes the supported image formats in the rendering environments to the extension provider. Image formats are separated by semi-colon. For example, the argument could be JPG;PNG;BMP;SVG</li>
<li><code>public void setLocale(Locale locale)</code> ---- passes the rendering locale to the extension provider.</li>
<li><code>public Object onRowSets(IRowSet[] rowSets) throws BirtException</code> ---- 
processes the extended item in report presentation environment. The data that the report item needs is passed in through the rowSets array. The return value captures the presentation time output of the report item, and differs for different rendering primitives. </li>
<li><code>public void deserialize(InputStream istream)</code> ---- 
deserializes the report item generation time state</li>
<li><code>public int getOutputType(String mimeType)</code> ---- 
returns the output type, which could be one of the supported primitive, i.e., image, string, html segment, etc.</li>
<li><code>public void Size getSize()</code> ---- 
gets the size of the extended item. The size is a Dimension object. The width and height can only be in absolute units (inch, mm, etc.) or pixel. It can not be a relative size such as 150% or 1.2em. An extended item can obtain its design-time size information by querying DE. This function is needed because the actual size may not be the same as the design-time size.</li>
<li><code>public void finish()</code> ---- 
performs cleanup jobs</li><p>
</ul>
<p></p>

<h6 class=CaptionFigColumn id=header>Supplied Implementation: </h6>Chart as an extended item
<p></p>

<br>
<p class=note id=copyright>
Copyright (c) 2005 Actuate Corporation. All rights reserved. This program and 
the accompanying materials are made available under the terms of the Eclipse 
Public License v2.0 which accompanies this distribution, and is available at 
https://www.eclipse.org/legal/epl-2.0/<br/><br/>

Contributors: Actuate Corporation - initial API and implementation
<p></p>

</p>
</BODY>
</HTML>
